<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ScreenCoder - UI截图转代码的智能工具</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
        }
        .serif-font {
            font-family: 'Noto Serif SC', serif;
        }
        .gradient-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        .feature-icon {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            border-radius: 8px;
            padding: 1.5rem;
            overflow-x: auto;
            font-family: 'Consolas', 'Monaco', monospace;
        }
        .step-number {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            margin-top: -0.2rem;
            color: #667eea;
        }
        .highlight-box {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            border-left: 4px solid #667eea;
            padding: 1.5rem;
            border-radius: 8px;
            margin: 2rem 0;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-6">
        <div class="max-w-6xl mx-auto text-center">
            <h1 class="text-5xl md:text-6xl font-bold mb-6 serif-font">ScreenCoder</h1>
            <p class="text-xl md:text-2xl mb-8 opacity-90">将UI设计瞬间转化为优雅代码的智能工具</p>
            <div class="flex justify-center space-x-6 mb-12">
                <a href="https://github.com/leigest519/ScreenCoder" target="_blank" class="bg-white text-purple-700 px-8 py-3 rounded-full font-semibold hover:bg-gray-100 transition duration-300 flex items-center">
                    <i class="fab fa-github mr-2"></i> GitHub
                </a>
                <button class="bg-transparent border-2 border-white px-8 py-3 rounded-full font-semibold hover:bg-white hover:text-purple-700 transition duration-300">
                    <i class="fas fa-play mr-2"></i> 开始使用
                </button>
            </div>
            <div class="max-w-4xl mx-auto bg-white bg-opacity-10 backdrop-blur-md rounded-2xl p-8">
                <p class="text-lg leading-relaxed">
                    <span class="drop-cap serif-font">S</span>creenCoder 是一个开源工具，旨在将用户界面（UI）截图或设计草图转化为结构清晰、可编辑的 HTML 和 CSS 代码。它主要服务于前端开发者、UI/UX 设计师以及产品团队，帮助他们快速将视觉设计转化为可用的网页代码。
                </p>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-6xl mx-auto px-6 py-16">
        <!-- Problem Section -->
        <section class="mb-16">
            <h2 class="text-3xl font-bold mb-8 text-gray-800 flex items-center">
                <i class="fas fa-puzzle-piece mr-3 feature-icon"></i>
                它能解决什么问题
            </h2>
            <div class="bg-white rounded-2xl shadow-lg p-8 card-hover">
                <p class="text-lg leading-relaxed text-gray-700 mb-6">
                    在前端开发中，将设计稿转化为代码往往是一个耗时且容易出错的过程。开发者需要手动分析复杂的 UI 布局，确保像素级别的精确对齐，同时保持设计与代码的一致性。
                </p>
                <div class="grid md:grid-cols-3 gap-6">
                    <div class="text-center">
                        <i class="fas fa-clock text-4xl text-purple-600 mb-3"></i>
                        <h3 class="font-semibold mb-2">耗时费力</h3>
                        <p class="text-gray-600">手动编码重复劳动多</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-exclamation-triangle text-4xl text-purple-600 mb-3"></i>
                        <h3 class="font-semibold mb-2">容易出错</h3>
                        <p class="text-gray-600">像素级对齐困难重重</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-sync-alt text-4xl text-purple-600 mb-3"></i>
                        <h3 class="font-semibold mb-2">迭代困难</h3>
                        <p class="text-gray-600">设计变更代码难同步</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Core Features -->
        <section class="mb-16">
            <h2 class="text-3xl font-bold mb-8 text-gray-800 flex items-center">
                <i class="fas fa-star mr-3 feature-icon"></i>
                核心功能概述
            </h2>
            <div class="grid md:grid-cols-2 gap-6">
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start mb-4">
                        <i class="fas fa-eye text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">UI 元素检测</h3>
                            <p class="text-gray-600">通过视觉语言模型（VLM）识别截图中的按钮、文本框、图片等 UI 组件，并对其进行语义标注</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start mb-4">
                        <i class="fas fa-sitemap text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">层次化布局规划</h3>
                            <p class="text-gray-600">基于前端工程知识，生成层次化的布局树，自动规划组件的排列和间距</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start mb-4">
                        <i class="fas fa-code text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">自适应代码生成</h3>
                            <p class="text-gray-600">将检测到的组件和布局转化为干净的 HTML/CSS 代码，支持用户自定义修改</p>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start mb-4">
                        <i class="fas fa-images text-2xl text-purple-600 mr-4 mt-1"></i>
                        <div>
                            <h3 class="text-xl font-semibold mb-2">图像替换支持</h3>
                            <p class="text-gray-600">自动将截图中的图像元素裁剪并嵌入最终代码，确保视觉效果一致</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Workflow Visualization -->
        <section class="mb-16">
            <h2 class="text-3xl font-bold mb-8 text-gray-800 flex items-center">
                <i class="fas fa-project-diagram mr-3 feature-icon"></i>
                工作流程图解
            </h2>
            <div class="bg-white rounded-2xl shadow-lg p-8">
                <div class="mermaid">
                    graph LR
                    A[UI截图/设计稿] --> B[视觉理解模块]
                    B --> C[UI元素检测]
                    C --> D[布局规划模块]
                    D --> E[层次化布局树]
                    E --> F[代码生成模块]
                    F --> G[HTML/CSS代码]
                    style A fill:#f9f,stroke:#333,stroke-width:2px
                    style G fill:#9f9,stroke:#333,stroke-width:2px
                </div>
            </div>
        </section>

        <!-- Use Cases -->
        <section class="mb-16">
            <h2 class="text-3xl font-bold mb-8 text-gray-800 flex items-center">
                <i class="fas fa-lightbulb mr-3 feature-icon"></i>
                使用场景
            </h2>
            <div class="space-y-6">
                <div class="bg-white rounded-xl shadow-lg p-6 border-l-4 border-purple-600">
                    <h3 class="text-xl font-semibold mb-3 flex items-center">
                        <span class="step-number mr-3">1</span>
                        快速原型开发
                    </h3>
                    <p class="text-gray-700 ml-11">产品经理或设计师完成 UI 设计后，开发者可使用 ScreenCoder 将截图快速转化为 HTML/CSS 代码，用于构建交互式原型。例如，一个电商网站的首页设计稿可以迅速生成基本页面框架。</p>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 border-l-4 border-purple-600">
                    <h3 class="text-xl font-semibold mb-3 flex items-center">
                        <span class="step-number mr-3">2</span>
                        设计到开发的协作
                    </h3>
                    <p class="text-gray-700 ml-11">在跨团队协作中，设计师无需编写代码，只需提供截图，ScreenCoder 即可生成可用的前端代码，开发者再进行细节调整。</p>
                </div>
                <div class="bg-white rounded-xl shadow-lg p-6 border-l-4 border-purple-600">
                    <h3 class="text-xl font-semibold mb-3 flex items-center">
                        <span class="step-number mr-3">3</span>
                        复杂布局复现
                    </h3>
                    <p class="text-gray-700 ml-11">对于包含多层次导航栏、侧边栏或动态组件的复杂 UI，ScreenCoder 能准确解析布局并生成结构化代码。</p>
                </div>
            </div>
            <div class="highlight-box mt-8">
                <p class="text-gray-700 flex items-start">
                    <i class="fas fa-question-circle text-purple-600 mr-3 mt-1"></i>
                    <span><strong>思考提示：</strong>你的团队是否经常因设计稿与代码实现不一致而耗费时间？ScreenCoder 如何帮助你优化这一流程？</span>
                </p>
            </div>
        </section>

        <!-- Advantages -->
        <section class="mb-16">
            <h2 class="text-3xl font-bold mb-8 text-gray-800 flex items-center">
                <i class="fas fa-trophy mr-3 feature-icon"></i>
                优势与特色
            </h2>
            <div class="grid md:grid-cols-2 gap-6 mb-8">
                <div class="bg-gradient-to-br from-purple-50 to-pink-50 rounded-xl p-6">
                    <i class="fas fa-